home *** CD-ROM | disk | FTP | other *** search
/ The History of Denim / The History of Denim.iso / pc / floatlib.cst / 00002_Managing Pallettes.ls < prev    next >
Encoding:
Text File  |  1997-11-14  |  1.2 KB  |  44 lines

  1. on PurgeWindows
  2.   --Blows away all but Navigation Pallette
  3.   repeat with aa = count (the windowlist) down to 1
  4.     if getat(the windowlist,aa) <> (window "Navigation") then
  5.       set goaway = getat(the windowlist,aa)
  6.       close goaway
  7.       forget goaway
  8.     end if
  9.   end repeat
  10.   
  11.   --in case the QT Movie pallette was removed...
  12.   ResumeAudio
  13. end
  14.  
  15. on RemoveWindow Who
  16.   --this closes and purges from memory
  17.   --used becasause we want to design the close squares
  18.   close window Who
  19.   forget window Who
  20.   --put "Closing " & Who & " Window"
  21. end
  22.  
  23.  
  24. on RollWindow Who
  25.   --Toggle Function
  26.   set WindowAt = the rect of window Who
  27.   set WindowSource = the sourceRect of window  Who
  28.   set height = getat (WindowSource, 4) - getat(WindowSource,2)
  29.   set CurrentHeight = getat (WindowAt, 4) - getat(WindowAt,2)
  30.   
  31.   if CurrentHeight <=25 then
  32.     --this rolls the window down from a control bar
  33.     set NewY = getat (WindowAt,2) + height
  34.     --put "Rolldown " & Who
  35.   else
  36.     --this rolls the window up into just a control bar
  37.     set NewY = getat (WindowAt,2) + 25
  38.     --put "Rollup " & Who
  39.   end if
  40.   
  41.   --this puts the new rect on stage
  42.   setat (WindowAt,4,NewY)
  43.   set the rect of window Who = WindowAt
  44. end